1 REM BY JIM MCANDREW 10 POKE56,26:CLR:RUN11 11 PRINTCHR$(142)CHR$(147)SPC(14)" REL-COPY [146]":PRINT 14 PRINTSPC(14)"[206][165]":PRINTSPC(10)"BY [205][204][186][204][206][205][206][205][164]":PRINTSPC(14)"[206][165]":PRINTSPC(14)"[205][165]"SPC(8)"(R)" 15 Z$=CHR$(0):P=256:DIMBY(17) 19 READML$:INSUBML=PEEK(65)+PEEK(66)*P+7:READML$:OUTSUBML=PEEK(65)+PEEK(66)*P+7 20 READML$:DISABLE WEDGE=PEEK(65)+PEEK(66)*P+7 30 PRINT" SINGLE FILE- SINGLE/DUAL DISK TRANSFER" 31 PRINT" FOR RELATIVE FILES (ONLY!)" 33 IFPEEK(124)=76THENPRINTSPC(10)" WEDGE DISABLED [146]":SYS DISABLE:W=1 35 PRINT" DRIVE#: FROM,TO 8,8[157][157][157][157][157]";:INPUTDS,DD:D=DS 36 OPEN15,D,15:CLOSE15:IFST<0THENPRINT" DEVICE#"D" NOT PRESENT[146]":GOTO35 37 IFD=DSTHENIFDS<>DDTHEND=DD:GOTO36 40 GOSUB150:GOSUB200:IFENTHEN40 45 IFENTHEN40 50 TF=T:SF=S:RL=BY(3):NB=BC:RN=INT((NB*254)/BY(3)):RL=BY(3):RC=0 60 GOSUB600 65 GOSUB700 66 GOSUB800:IFEFTHENEF=0:GOTO65 67 GOSUB855 70 D=DD:GOSUB220:IFENTHEN70 75 TW=T:SW=S:GOSUB940:IFEFTHEN95 80 IFAFTHENGOSUB140:GOSUB600:GOSUB680:GOSUB950 90 IFAFTHEN80 91 PRINT" COMPLETE[146]":IFNB>232THEN95 92 PRINT" W[146] WRITE THIS FILE AGAIN":PRINT" E[146] END" 93 GOSUB170:IFAN$="W"THENPF=0:GOTO65 94 IFAN$<>"E"THEN93 95 POKE56,160:IFWTHEN100 99 END 100 IFNB>179THEN110 105 IFPEEK(52224)=76ANDPEEK(52226)=204THENSYS52224:END 110 PRINT" CAN'T REWEDGE":END 140 IFDS<>DDTHENIFPFTHENRETURN 149 : 150 REM**GET SOURCE DISK READY** 151 : 155 PRINT" SOURCE DISK MUST BE PRESENT":D=DS 160 PRINT" IN DRIVE#"D"FOR NEXT STEP..." 165 PRINT" PRESS ANY KEY WHEN READY" 170 FORX=1TO10:GETAN$:NEXT 175 GETAN$:IFAN$=""THEN175 180 RETURN 199 : 200 REM ** READ REL FILE SPEC.S 201 : 205 PRINT:INPUT"NAM*";NA$ 210 PRINT"  READING FILE SPEC.S... " 220 OPEN15,D,15,"I":GOSUB8000:IFENTHENCLOSE15:GOTO220 225 OPEN8,D,8,NA$:GOSUB8000:IFENTHENCLOSE8:CLOSE15:RETURN 230 PRINT#15,"M-R"CHR$(24)CHR$(0)CHR$(2):GET#15,TR$,SC$:CLOSE8 240 TR=ASC(TR$+Z$):SC=ASC(SC$+Z$):OPEN8,D,8,"#":BC=0 245 PRINT#15,"U1:"8;0;TR;SC:GOSUB8000:IFENTHEN245 250 FORX=0TO17:GET#8,BY$:BY(X)=ASC(BY$+Z$):NEXT 255 IFBY(2)=0THENT=BY(16):S=BY(17) 260 IFBY(0)=0THEN280 265 FORX=6TO14STEP2 270 IFNOTBY(2)THENIFBY(X)THENBC=BC+120:TR=BY(X):SC=BY(X+1) 275 NEXT:GOTO245 280 BC=BC+(BY(1)-15)/2:CLOSE8:CLOSE15:RETURN 290 CLOSE8:CLOSE15:RETURN 599 : 600 REM READ BLOCK CHAIN 601 : 605 POKE253,0:POKE254,26:PRINT"  READING FILE DATA... [146]" 610 OPEN15,DS,15,"I":GOSUB8000:IFENTHENCLOSE15:GOTO610 615 OPEN8,DS,8,"#":GOSUB8000:IFENTHENCLOSE8:CLOSE15:GOTO610 620 BN=0:AF=0:T=TF:S=SF:PRINT 625 PRINT#15,"U1:"8;0;T;S:GOSUB8000:IFENTHEN625 626 PRINT" BLOCK# [157][157][157][157]";RC+BN+1:PRINT"[145]"; 630 GET#8,T$,S$:T=ASC(T$+Z$):S=ASC(S$+Z$) 635 SYS INSUBML 640 BN=BN+1:IFBN=231THENIFT<>0THENAF=1:GOTO655 645 IFT=0THEN655 650 GOTO625 655 CLOSE15:CLOSE8:TF=T:SF=S:RC=RC+BN:RETURN 679 : 680 REM PREPARE OUTPUT DISK 681 : 685 IFDS<>DDTHENIFPFTHENRETURN 700 PRINT" DESTINATION DISK MUST BE PRESENT":D=DD:GOTO160 799 : 800 REM CHECK DISK SPACE 801 : 805 PRINT"  CHECKING DISK SPACE... [146]";:EF=0 810 OPEN15,DD,15,"I":GOSUB8000:IFENTHENCLOSE15:GOTO810 815 PRINT#15,"M-R"CHR$(250)CHR$(2)CHR$(3):GET#15,F$,G$,G$ 820 BF=(P*ASC(G$+Z$)+ASC(F$+Z$)) 825 IFBF>=NB-1*INT(-NB/120)THENPRINT"O.K.[146]":CLOSE15:RETURN 830 PRINT:PRINTSPC(5)" NOT ENOUGH ROOM ON THIS DISK [146]":CLOSE15:EF=1:RETURN 849 : 851 : 855 REM CREATE REL FILE 856 : 860 PRINT:PRINT"NAME ";NA$:PRINT"[145]";:INPUTNA$ 861 IFRIGHT$(NA$,1)="*"THENPRINT"SORRY,=>* NOT ALLOWED IN FILE NAME":GOTO860 865 OPEN15,DD,15,"I":GOSUB8000:IFENTHEN865 866 PRINT"  CREATING RELATIVE FILE...[146]" 870 OPEN8,DD,8,NA$+",L,"+CHR$(RL):GOSUB8000:IFENTHENCLOSE8:CLOSE15:GOTO860 872 HB=INT(RN/256):LB=RN-HB*256:WC=0 875 PRINT#15,"P"CHR$(8)CHR$(LB)CHR$(HB):OK=50:GOSUB8000:OK=0:IFENTHEN875 878 PRINT#8,"":OK=50:GOSUB8000:OK=0:IFENTHEN875 880 CLOSE8:CLOSE15:RETURN 940 IFBC<>NBTHENPRINT" ERROR FILE LENGTH MISMATCH.. ABORTED[146]":EF=1:RETURN 945 PRINT"  FILE CREATED,";:PF=1 946 : 947 REM WRITE DATA 948 : 950 IFPFTHENPRINT:PRINT 951 PRINT" WRITING DATA...[146]":PF=1 955 POKE253,0:POKE254,26:T=TW:S=SW:CN=0 960 OPEN15,DD,15,"I":GOSUB8000:IFENTHEN960 965 OPEN8,DD,8,"#":GOSUB8000:IFENTHENCLOSE8:GOTO965 970 PRINT#15,"U1:"8;0;T;S:GOSUB8000:IFENTHEN970 975 GET#8,TW$,SW$:TW=ASC(TW$+Z$):SW=ASC(SW$+Z$) 980 SYS OUTSUBML 985 PRINT#15,"U2:"8;0;T;S:GOSUB8000:IFENTHEN985 990 CN=CN+1 992 PRINT" BLOCK# [157][157][157][157]";WC+CN:PRINT"[145]"; 995 T=TW:S=SW:IFT=0THEN999 996 IFCN=231THEN999 998 GOTO970 999 CLOSE8:CLOSE15:WC=WC+CN:RETURN 7997 : 7998 REM CHECK DISK ERROR CHANEL 7999 : 8000 INPUT#15,EN,EM$,ET,ES:IFEN=0THENRETURN 8005 IFOKTHENIFEN=OKTHENEN=0:OK=0:RETURN 8010 PRINT:PRINT" DISK ERROR[146]=>"EN;EM$;ET;ES:PRINT:PRINT" TRY AGAIN? Y/N 8020 [141]170 8030 [139]AN$[178]"Y"[167][142] 8040 [139]AN$[179][177]"N"[167]8020 8050 [160]8:[160]15:[137]95 8800 [143]  *** CAUTION ***  8891 [143] THESE DATA STATEMENTS CANNOT BE ALTERED OR REENTERED FROM THE KEYBOARD! 9000 [131]"THROW AWAY" 9020 [131]"STEPINPUTNEW ASC(null)CLOSE(null)LEFT$ASC FN(null)xASCASCON(null)(null)(null)X(null)(null)(null)(null)(null)(null)(null)(null)(null)L(null)(null)XXX" 9040 [131]"STEPINPUTNEW RIGHT$(null)CLOSE(null)LEFT$ASCxASCASC>(null)(null)(null)X NOT(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)L(null)(null)XXX" 9060 [131]"NEWEXP-(null)VERIFY|MID$(null)`"